module.exports = (config) => {
  config.plugins.push([
    require.resolve('babel-plugin-import'),
    {
      libraryName: 'react-iaux',
      libraryDirectory: 'es',
      style: true,
      camel2DashComponentName: false,
      customName: (name) => {
        return `react-iaux/es/${[name[0].toLowerCase(), name.substr(1)].join('')}`;
      },
    },
    'iaux-import',
  ]);
  config.plugins.push([
    require.resolve('babel-plugin-import'),
    {
      libraryName: 'antd',
      libraryDirectory: 'es',
      style: true,
      camel2DashComponentName: true,
    },
    'antd-import',
  ]);
  config.sourceType = 'unambiguous';
  return config;
};
